<?php
session_start();

$cant_fbinvitation_ext = "No has enviado solicitudes.";
$contador = 0;

if (is_array($_SESSION["g2uFriendInvFBList_ext"]) && !empty($_SESSION["g2uFriendInvFBList_ext"])) {
    $cant_fbinvitation_ext = count($_SESSION["g2uFriendInvFBList_ext"]);
    ?>
    <table width='100%' cellpadding = '3px' cellspacing="0">
            <tr>
    <?
    foreach ($_SESSION["g2uFriendInvFBList_ext"] as $key => $value) {
?>
        
                <td width="50px">
                    <img src='<?=$value["upic"]?>' />
                </td>
                <td width="35%">
                    <b><?=$value['usuario']?></b>
                    <br/>
                    <img src="images/png/delete.png" onclick="cancelFriend('<?=$value['id']?>')" style="cursor: pointer;" id="<?=$value['id']?>" />
                </td>
<?php
                if($cant_fbinvitation_ext==1){
                ?>
                <td width="50px">
                    
                </td>
                <td width="35%">
                </td>
                <?
                }
                if($contador == 2){
                    ?>
                    </tr>;
                    <tr>;
                    <?
                    $contador = 0;
                }
                $contador++;
    }
    ?>
         </tr>
    </table>       
    <?php
} else {
    echo $cant_fbinvitation_ext;
}
?>